package com.allwees.bs.c.module.order.dto;

import com.allwees.bs.c.module.order.entity.OrderSkuSnapEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel(description = "商品快照")
public class ProductSnapDTO implements Serializable {

//    @ApiModelProperty(value = "ID，主键，手动生成UUID")
    private String uuid;

//    @ApiModelProperty(value = "商品名称")
    private String name;

    private String mainPhoto;

//    @ApiModelProperty(value = "商品描述")
    private String description;

//    @ApiModelProperty(value = "快递价格")
    private BigDecimal shippingPrice;

//    @ApiModelProperty(value = "快递价格币种")
    private String shippingCurrency;

//    @ApiModelProperty(value = "快递预计到达时间")
    private String shippingArrivalDesc;

    private Boolean freeGift;

    private Integer marketingType;

    public ProductSnapDTO(OrderSkuSnapEntity skuSnap) {
        this.setUuid(skuSnap.getProductUuid());
        this.setName(skuSnap.getProductName());
        this.setMainPhoto(skuSnap.getProductPhoto());
        this.setDescription(skuSnap.getProductDesc());
        this.setShippingPrice(skuSnap.getSkuShippingPrice());
        this.setShippingCurrency(skuSnap.getSkuShippingCurrency());
        this.setShippingArrivalDesc(skuSnap.getProductShippingArrivalDesc());
        this.freeGift = skuSnap.getFreeGiftProd();
        this.marketingType = skuSnap.getMarketingType();

    }
}
